<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>主页 - 停车管理系统</title>
    <style>
        /* 全局样式 */
        body {
            margin: 0;
            font-family: 'Roboto', sans-serif;
            display: flex;
            flex-direction: column;
            height: 100vh;
            background-image: url('../images/停车场图片1.png');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            background-attachment: fixed;
            filter: brightness(90%);
        }

        /* 顶部标题和注销按钮 */
        header {
            background-color: rgba(0, 123, 255, 0.8);
            color: white;
            padding: 15px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
            transition: background-color 0.3s ease;
        }

        #logo {
            height: 40px;
            margin-right: 15px;
            vertical-align: middle;
        }

        header h1 {
            margin: 0;
            font-size: 24px;
            font-weight: 700;
            letter-spacing: 1px;
        }

        header button {
            padding: 8px 15px;
            background-color: #f44336;
            border: none;
            color: white;
            border-radius: 5px;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }

        header button:hover {
            background-color: #d32f2f;
        }

        /* 主体布局 */
       .container {
            display: flex;
            height: calc(100vh - 60px);
        }

        /* 左侧导航栏样式 */
        nav {
            width: 200px;
            background-color: rgba(0, 123, 255, 0.8);
            color: white;
            height: 100%;
            padding: 20px;
            box-sizing: border-box;
            box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
            transition: background-color 0.3s ease;
        }

        nav ul {
            list-style: none;
            padding: 0;
        }

        nav ul li {
            margin: 15px 0;
        }

        nav ul li a {
            text-decoration: none;
            color: white;
            padding: 10px 20px;
            display: block;
            border-radius: 5px;
            transition: background-color 0.3s ease;
        }

        nav ul li a:hover {
            background-color: rgba(0, 86, 179, 0.8);
        }

        /* 主内容区样式 */
        main {
            flex-grow: 1;
            padding: 20px;
            box-sizing: border-box;
            height: 100%;
            background-color: rgba(255, 255, 255, 0.8);
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        }

        main iframe {
            width: 100%;
            height: 100%;
            border: none;
            border-radius: 10px;
        }
    </style>
</head>

<body>
    <header>
        <img id="logo" src="logo.png" alt="停车管理系统logo">
        <h1>停车综合管理系统</h1>
        <button id="logoutBtn">注销用户</button>
    </header>
    <div class="container">
        <!-- 左侧导航栏 -->
        <nav>
            <ul>
                <li><a href="parking_info.html" target="contentFrame">停车场管理</a></li>
                <li><a href="seat.html" target="contentFrame">车位管理</a></li>
                <li><a href="parkingvehicle.html" target="contentFrame">车辆进出数据</a></li>
            </ul>
        </nav>
        <!-- 主内容显示区域 -->
        <main>
            <iframe name="contentFrame" src="parking_info.html" frameborder="0"></iframe>
        </main>
    </div>
    <script>
        // 注销功能
        document.getElementById('logoutBtn').addEventListener('click', () => {
            alert('用户已注销！');
            window.location.href = "login.html"; // 跳转到登录页面
        });
    </script>
</body>

</html>